﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Framework.Core;

namespace Framework
{
    /// <summary>
    /// Auditable base Entity
    /// </summary>
    public abstract class AuditableEntity : BaseEntity
    {
        #region Fields

        private DateTime _createdOn;
        private DateTime _updatedOn;

        #endregion

        #region Ctors

        protected AuditableEntity()
        {
            _createdOn = DateTime.UtcNow;
            _updatedOn = DateTime.UtcNow;
        }

        #endregion

        #region Properties

        public virtual DateTime CreatedOn
        {
            get
            {
                return _createdOn;
            }
            set
            {
                _createdOn = value;
            }
        }

        public virtual DateTime UpdatedOn
        {
            get
            {
                return _updatedOn;
            }
            set
            {
                _updatedOn = value;
            }
        }

        #endregion

        #region Utilities

        #endregion
    }
}
